Hi Toby,
We recently added a feature that I believe would work well for this. It is now possible to insert a "Wait for Bit" into the motion buffer data stream. This will basically cause the motion to stall until an IO bit changes. An external input or a Virtual IO bit might be used. This allows true real-time control where motion needs to be synchronized to other events. See:
Let me know if you have any questions or problems.
Regards
TK
Group: DynoMotion |
Message: 5444 |
From: Toby Rule |
Date: 7/19/2012 |
Subject: Re: m-code, c-program and StopCoordinatedMotion() |
Hi Tom, This looks like it will provide the features I need. However, my customer would prefer a solution that uses only a single m-code command between segments. Is there any other way to prevent the next segment from starting directly from c-code that is executed by the m-code? Thanks, Toby From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes Sent: Wednesday, July 18, 2012 5:31 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] m-code, c-program and StopCoordinatedMotion() We recently added a feature that I believe would work well for this. It is now possible to insert a "Wait for Bit" into the motion buffer data stream. This will basically cause the motion to stall until an IO bit changes. An external input or a Virtual IO bit might be used. This allows true real-time control where motion needs to be synchronized to other events. See: Let me know if you have any questions or problems. I’m working on a laser cutting application where I need to pause between traverse and feed segments, using an MCode command that runs a c-program I’m doing the feedhold using StopCoordinatedMotion(). However, it is not pausing the motion when I fire it using an m-code between segments. (My test g-code looks like this) // The c-code looks like this. // If I add a pause here, then it will work, // presumably because it is now in the feed segment. ResumeCoordinatedMotion(); Am I doing something wrong? Is there another way to delay the start of the next segment? The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.
The information contained in this transmission is intended only for the person or entity
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
material. If you are not the intended recipient, please contact the sender immediately
and destroy the material in its entirety, whether electronic or hard copy. You are
notified that any review, retransmission, copying, disclosure, dissemination or other
use of, or taking of any action in reliance upon this information by persons or entities
other than the intended recipient is prohibited.
|
|
Group: DynoMotion |
Message: 5445 |
From: Toby Rule |
Date: 7/19/2012 |
Subject: Re: m-code, c-program and StopCoordinatedMotion() |
Hi Tom, I may have solved my problem. At the start of the thread that my m-code executes, which handles timing and laser on/off switching, I do: ResumeThread(4) where thread 4 (which was previously started/stopped) looks like this: while(TRUE){ StopCoordinatedMotion(); WaitNextTimeSlice(); } Then when I’m done with my timing/switching, I do: PauseThread(4); ResumeCoordinatedMotion(); Then I can do everything I need to do with one M-code. Thanks, Toby From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes Sent: Wednesday, July 18, 2012 5:31 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] m-code, c-program and StopCoordinatedMotion() We recently added a feature that I believe would work well for this. It is now possible to insert a "Wait for Bit" into the motion buffer data stream. This will basically cause the motion to stall until an IO bit changes. An external input or a Virtual IO bit might be used. This allows true real-time control where motion needs to be synchronized to other events. See: Let me know if you have any questions or problems. I’m working on a laser cutting application where I need to pause between traverse and feed segments, using an MCode command that runs a c-program I’m doing the feedhold using StopCoordinatedMotion(). However, it is not pausing the motion when I fire it using an m-code between segments. (My test g-code looks like this) // The c-code looks like this. // If I add a pause here, then it will work, // presumably because it is now in the feed segment. ResumeCoordinatedMotion(); Am I doing something wrong? Is there another way to delay the start of the next segment? The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.
The information contained in this transmission is intended only for the person or entity
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
material. If you are not the intended recipient, please contact the sender immediately
and destroy the material in its entirety, whether electronic or hard copy. You are
notified that any review, retransmission, copying, disclosure, dissemination or other
use of, or taking of any action in reliance upon this information by persons or entities
other than the intended recipient is prohibited.
|
|
| |